Skip to content

Conversation

JasonWeinzierl
Copy link
Owner

Fixes cartant#100

There's also a proposed fix PR in the upstream repo cartant#114 but I avoided looking at that solution to avoid any license issue, so this solution might be different.

  • Fix: if the shareReplay operator was passed an object config, then require bufferSize to be in that object.
  • Fix: the rule wasn't handling if shareReplay is imported under a namespace.
    • (Might need to review the entire project. Since rxjs now recommends importing from "rxjs" instead of "rxjs/operators", there's a risk that many rules also fail to account for that new paradigm. Note that this rule is the only rule that tests namespace imports for all cases, so we at least should expand that coverage/type of test.)

Copy link

github-actions bot commented Nov 8, 2024

LCOV of commit 514d20b during .github/workflows/ci.yml #40

Summary coverage rate:
  lines......: 96.3% (3276 of 3403 lines)
  functions..: 93.0% (198 of 213 functions)
  branches...: 91.2% (620 of 680 branches)

Files changed coverage rate:
                                         |Lines       |Functions  |Branches    
  Filename                               |Rate     Num|Rate    Num|Rate     Num
  =============================================================================
  src/rules/no-ignored-replay-buffer.ts  | 100%     75| 100%     7| 100%     13

@JasonWeinzierl JasonWeinzierl merged commit ef2f886 into main Nov 8, 2024
2 checks passed
@JasonWeinzierl JasonWeinzierl deleted the check-config-buffer-size branch November 8, 2024 16:37
@JasonWeinzierl JasonWeinzierl added the bug Something isn't working label Nov 9, 2024
@JasonWeinzierl JasonWeinzierl added this to the v1 milestone Nov 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

no-ignored-replay-buffer doesn't check bufferSize if object config passed to shareReplay
1 participant